import { ResPage } from "@/api/interface/index";
import { PORT_Company } from "@/api/config/servicePort";
import http from "@/api";
import type { Company } from "@/api/interface";

/**
 * @name 公司管理模块
 */
// 获取公司列表（分页）
export const getCompanyList = (params: Company.ReqCompanyParams) => {
  return http.post<ResPage<Company.ResCompanyList>>(PORT_Company + `/list`, params);
};

// 保存公司信息
export const saveCompany = (params: Company.ReqCompanySaveParams) => {
  return http.post<string>(PORT_Company + `/save`, params);
};

// 删除公司
export const deleteCompany = (companyId: number) => {
  return http.post<boolean>(PORT_Company + `/delete?companyId=${companyId}`);
};
